package com.le.edu.resp;


import lombok.Getter;

/**
 * 统一返回结果状态信息类
 */
@Getter
public enum ResultCodeEnum {

    SUCCESS(200, "操作成功"),

    FORBIDDEN(403, "访问受限，授权过期"),
    USER_ACCOUNT_DISABLED(403, "用户权限不可用"),

    FAIL(500, "操作失败"),

    //3xxx:  用户系统有关异常
    USER_NEED_LOGIN(30000, "未登录"),
    USER_CAPTCHA_INVAILD(30001, "验证码错误"),
    USER_ACCOUNT_PWD_ERROR(30002, "用户名密码错误"),
    USER_ID_REQUIRED(30003, "用户id必须携带"),
    USER_HAS_EXIST(30004, "用户已存在"),
    USER_INVAILD(30005, "非法用户，请重新登录"),
    USER_NOT_EXIST(30006, "用户名不存在"),
//    SHOP_PRODUCT_HAS_NO_STOCK(50001,"商品没有库存")


    //以后 APP 的错误都是 9xxxx
    APP_CODE_INVAILD(90001, "验证码错误"),
    APP_MEMBER_INVAILD(90002, "非法用户");

    private Integer code;

    private String message;

    private ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}

